<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 一、传统函数定义
        // function sum(a,b) {
        //     let r = a + b ;
        //     return r ;
        // }
        // let result = sum(1,1) ;
        // console.log(result);
        
        // 二、箭头函数定义
        // let | const 函数名称 = ([参数列表]) => { 函数体 }
        let sum = (a,b) => { 
            let r = a + b ;
            return r ;
        } 

        let result = sum(1,2) ;
        console.log(result);
        





    </script>
</body>
</html>